<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
  
<!-- Mirrored from bos.asmhackers.net/docs/filesystems/ntfs/indexentry.html by HTTrack Website Copier/3.x [XR&CO'2013], Tue, 07 Oct 2014 11:26:07 GMT -->
<head>
    <title>NTFS Documentation: Index Entry</title>
  </head>

  <body>
    <h1><a href="index-2.html#NTFS" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/index.html#NTFS">NTFS</a> Documentation: Index Entry</h1>

    <h2>Definition</h2>
    This is the basic component of an index (e.g. a <a href="dir.html" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/dir.html">directory</a>).
    <p>

    <h2>Layout</h2>
    Its layout is:
    <p>

    <table border=2 cellspacing=2 cellpadding=2>
      <tr bgcolor="#E0E0E0">
        <th>Offset to the beginning of the index entry</th>
        <th>Length</th>
        <th>Description</th>
      </tr>
      <tr>
        <th colspan="3">The next field is only valid when the <a href="#last">last entry flag</a> is not set</th>
      </tr>
      <tr>
        <th>0</th>
        <th>8</th>
        <th><a href="fileref.html" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/fileref.html">File reference</a></th>
      </tr>
      <tr>
        <th>8</th>
        <th>2</th>
        <th><a name="length">L = Length of the index entry</a></th>
      </tr>
      <tr>
        <th>A</th>
        <th>2</th>
        <th>M = <a href="#lots">Length of the stream</a></th>
      </tr>
      <tr>
        <th>C</th>
        <th>1</th>
        <th><a href="#flags">Flags</a></th>
      </tr>
      <tr>
        <th></th>
        <th></th>
        <th></th>
      </tr>
      <tr>
        <th colspan="3">The next field is only present when the <a href="#last">last entry flag</a> is not set</th>
      </tr>
      <tr>
        <th>10</th>
        <th>M</th>
        <th><a href="#copy">Stream</a></th>
      </tr>
      <tr>
        <th colspan="3">The next field is only present when the <a href="#sub_flag">sub-node flag</a> is set</th>
      </tr>
      <tr>
        <th>L - 8</th>
        <th>8</th>
        <th><a href="attribute.html#VCN" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/attribute.html#VCN">VCN</a> of the <a href="dir.html#ibnode" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/dir.html#ibnode">sub-node</a> in the <a href="indexallocation.html" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/indexallocation.html">index allocation attribute</a></th>
      </tr>
    </table>
    <p>

    <dl>
      <dt><a name="lots">Length of the <a href="attribute.html#stream" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/attribute.html#stream">stream</a></a>
        <dd>A copy of the <a href="attribute.html#stream_length" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/attribute.html#stream_length">field at offset 10 in the header part of the resident file attribute</a> indexed by the index entry. But why the hell haven't these 2 fields the same size?
        <p>

      <dt><a name="flags">Flags</a>
        <dd><table border=2 cellspacing=2 cellpadding=2>
	      <tr bgcolor="#E0E0E0">
	        <th>Bit</th>
                <th>Signification</th>
              </tr>
              <tr>
                <th>01</th>
                <th><a name="sub_flag">Index entry points to a <a href="dir.html#ibnode" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/dir.html#ibnode">sub-node</a></a></th>
              </tr>
              <tr>
                <th>02</th>
                <th><a name="last">Last index entry in the <a href="dir.html#node" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/dir.html#node">node</a></a></th>
              </tr>
            </table>
	    <p>

            The last entry flag is used to indicate the end of a sequence of index entries. Although it does not represent a valid <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a>, it can point to a <a href="dir.html#ibnode" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/dir.html#ibnode">sub-node</a>.
        <p>

      <dt><a name="copy"><a href="attribute.html#stream" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/attribute.html#stream">Stream</a></a>
        <dd>A <a name="contain">copy</a> of the <a href="attribute.html#stream" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/attribute.html#stream">stream</a> of the <a href="attribute.html#resident" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/attribute.html#resident">resident file attribute</a> indexed by the index entry (e.g. for a <a href="dir.html" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/dir.html">directory</a>, the <a href="filename.html" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/filename.html">file name attribute</a>).
        <p>

    </dl>
    <p>

    <hr>
    <address><a href="mailto:rduchesne@infovistaus.com">Regis Duchesne</a></address>
<!-- Created: Mon Jan 25 17:09:53 PST 1999 -->
<!-- hhmts start -->
Last modified: Mon Feb 15 08:43:45 PST 1999
<!-- hhmts end -->
  </body>

<!-- Mirrored from bos.asmhackers.net/docs/filesystems/ntfs/indexentry.html by HTTrack Website Copier/3.x [XR&CO'2013], Tue, 07 Oct 2014 11:26:07 GMT -->
</html>